Skip to content

Conversation

@dreamer-coding
Copy link
Contributor

Fossil XSDK Pull Request

Description

This update introduces a keyword-based file mode mapping for fossil_fstream_open and fossil_fstream_freopen. A new internal table, fossil_fstream_mode_table, defines both traditional fopen-style mode strings (e.g., "rb", "w+") and extended, human-readable aliases (e.g., "readb", "append+read"). A helper function, fossil_fstream_mode_from_keyword, translates these keywords into valid fopen mode strings. This change enhances readability and flexibility while maintaining compatibility with standard mode strings.

Testing

Same test making sure this did not blowup the stream

Checklist

  • Code follows the project's coding standards.
  • Tests have been added or updated to cover the changes.
  • Documentation has been updated to reflect the changes.
  • The code has been reviewed by team members.
  • All checks and tests pass.
  • The license header and notices are updated where necessary.

License

This project is licensed under the Mozilla Public License - see the LICENSE file for details.

@dreamer-coding dreamer-coding changed the title Update stream.c Introduces a keyword-based file mode mapping Apr 18, 2025
@dreamer-coding dreamer-coding merged commit 12d3ac2 into fossillogic:main Apr 21, 2025
23 checks passed
@dreamer-coding dreamer-coding deleted the add_kwargs_stream branch April 21, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant